﻿Imports System.Drawing.Color

Namespace Domain

    Public Class Cell

#Region " Variables "

        Private _xPos As Integer
        Private _yPos As Integer
        Private _hasAgent As Boolean = False
        Private _hasBreeze As Boolean = False
        Private _hasPit As Boolean = False
        Private _hasGlitter As Boolean = False
        Private _hasGold As Boolean = False
        Private _hasStench As Boolean = False
        Private _hasWumpus As Boolean = False
        Private _isVisited As Boolean = False
        Private _bumpRight As Boolean = False
        Private _bumpDown As Boolean = False
        Private _bumpLeft As Boolean = False
        Private _bumpUp As Boolean = False
        Private _picBox As PictureBox
        Private _lblBreeze As New Label
        Private _lblStench As New Label
        Private _lblGlitter As New Label
        Private _lblVisited As New Label
        Private _pointBreeze As New Point(0, 0)
        Private _pointStench As New Point(0, 50)
        Private _pointGlitter As New Point(25, 30)
        Private _pointVisited As New Point(40, 40)
        Private _probPit As New Boolean
        Private _probWumpus As New Boolean

       

#End Region

#Region " Properties "

        Public Property xPos() As Integer
            Get
                Return _xPos
            End Get
            Set(ByVal value As Integer)
                _xPos = value
            End Set
        End Property

        Public Property yPos() As Integer
            Get
                Return _yPos
            End Get
            Set(ByVal value As Integer)
                _yPos = value
            End Set
        End Property

        Public Property hasAgent() As Boolean
            Get
                Return _hasAgent
            End Get
            Set(ByVal value As Boolean)
                _hasAgent = value
            End Set
        End Property

        Public Property hasBreeze() As Boolean
            Get
                Return _hasBreeze
            End Get
            Set(ByVal value As Boolean)
                _hasBreeze = value
            End Set
        End Property
        

        Public Property hasPit() As Boolean
            Get
                Return _hasPit
            End Get
            Set(ByVal value As Boolean)
                _hasPit = value
            End Set
        End Property

        Public Property hasGlitter() As Boolean
            Get
                Return _hasGlitter
            End Get
            Set(ByVal value As Boolean)
                _hasGlitter = value
            End Set
        End Property

        Public Property hasGold() As Boolean
            Get
                Return _hasGold
            End Get
            Set(ByVal value As Boolean)
                _hasGold = value
            End Set
        End Property

        Public Property hasStench() As Boolean
            Get
                Return _hasStench
            End Get
            Set(ByVal value As Boolean)
                _hasStench = value
            End Set
        End Property

        Public Property hasWumpus() As Boolean
            Get
                Return _hasWumpus
            End Get
            Set(ByVal value As Boolean)
                _hasWumpus = value
            End Set
        End Property

        Public Property isVisited() As Boolean
            Get
                Return _isVisited
            End Get
            Set(ByVal value As Boolean)
                _isVisited = value
            End Set
        End Property

        Public Property picBox() As PictureBox
            Get
                Return _picBox
            End Get
            Set(ByVal value As PictureBox)
                _picBox = value
            End Set
        End Property

        Public Property probPit As Boolean
            Get
                Return _probPit
            End Get
            Set(ByVal value As Boolean)
                _probPit = value
            End Set
        End Property

        Public Property probWumpus As Boolean
            Get
                Return _probWumpus
            End Get
            Set(ByVal value As Boolean)
                _probWumpus = value
            End Set
        End Property

        Public Property bumpRight As Boolean
            Get
                Return _bumpRight
            End Get
            Set(ByVal value As Boolean)
                _bumpRight = value
            End Set
        End Property

        Public Property bumpDown As Boolean
            Get
                Return _bumpDown
            End Get
            Set(ByVal value As Boolean)
                _bumpDown = value
            End Set
        End Property

        Public Property bumpLeft As Boolean
            Get
                Return _bumpLeft
            End Get
            Set(ByVal value As Boolean)
                _bumpLeft = value
            End Set
        End Property

        Public Property bumpUp As Boolean
            Get
                Return _bumpUp
            End Get
            Set(ByVal value As Boolean)
                _bumpUp = value
            End Set
        End Property


#End Region

#Region " Methods "

        Public Sub setPit(ByVal aCell As Cell)

            With aCell
                .hasPit = True
            End With

        End Sub

        Public Sub setWumpus(ByVal aCell As Cell)

            With aCell
                .hasWumpus = True
            End With

        End Sub

        Public Sub setGold(ByVal aCell As Cell)

            With aCell
                .hasGold = True
                .hasGlitter = True
            End With

        End Sub

        Public Sub setBreezeLabel(ByVal visible As Boolean)

            _lblBreeze.Text = "B"
            _lblBreeze.Location = _pointBreeze
            _lblBreeze.BackColor = Transparent
            _lblBreeze.Parent = Me.picBox
            _lblBreeze.Visible = visible
            _lblBreeze.Font = New Font("Arial", 12, FontStyle.Bold)


        End Sub

        Public Sub setStenchLabel(ByVal visible As Boolean)

            _lblStench.Text = "S"
            _lblStench.Location = _pointStench
            _lblStench.BackColor = Transparent
            _lblStench.Parent = Me.picBox
            _lblStench.Visible = visible
            _lblStench.Font = New Font("Arial", 12, FontStyle.Bold)
        End Sub

        Public Sub setGlitterLabel(ByVal visible As Boolean)

            _lblGlitter.Text = "GL"
            _lblGlitter.Location = _pointGlitter
            _lblGlitter.BackColor = Transparent
            _lblGlitter.Parent = Me.picBox
            _lblGlitter.Visible = visible
            _lblGlitter.Font = New Font("Arial", 12, FontStyle.Bold)
        End Sub


        Public Sub setVisitedLabel(ByVal visible As Boolean)

            _lblVisited.Text = "v"
            _lblVisited.Location = _pointVisited
            _lblVisited.BackColor = Transparent
            _lblVisited.Parent = Me.picBox
            _lblVisited.Visible = visible
            _lblVisited.Font = New Font("Arial", 8, FontStyle.Bold)
        End Sub

      


        Public Sub resetCell(ByVal aCell As Cell)

            With aCell
                .hasAgent = False
                .hasBreeze = False
                .hasGlitter = False
                .hasGold = False
                .hasPit = False
                .hasStench = False
                .hasWumpus = False
                .isVisited = False

            End With

        End Sub

#End Region

    End Class

End Namespace


